
<?php include './application/views/top.php'; ?>
<script src="/static/js/ajaxfileupload.js"></script>
<script src="/static/js/My97DatePicker/WdatePicker.js"></script>
<script src="/static/js/formCheck.js"></script>

<div class="clear"></div>
<div class="user_bottom all"></div>
<div class="clear h50"></div>
<div class="layout uc">
	<?php include './application/views/user/left.php'; ?>
	<?php
		$sex = $v['sex'];
		$cardType = $v['cardType'];
	?>
	<div class="right">
		<div class="menu_list"><?php include './application/views/user/menu.php'; ?></div>
		<div class="cont">
        <form id="privacy_form">
        <input type="hidden" name="act" value="submit">
        	<div class="tishi" style="border:0px; padding:0px !important;">设置个人隐私</div>
			<dl class="line">
				<dt class="w200">谁可以看我的好友列表</dt>
                <dd class="w720">
				<select class="pubinput" name="friends">
					<option value="2" <?php if(isset($privacy['friends']) && $privacy['friends'] == 2) echo "selected='selected'";?>>所有人</option>
					<option value="1" <?php if(isset($privacy['friends']) && $privacy['friends'] == 1) echo "selected='selected'";?>>仅好友</option>
					<option value="0" <?php if(isset($privacy['friends']) && $privacy['friends'] == 0) echo "selected='selected'";?>>仅自己</option>
				</select>
                </dd>
			</dl>
			<dl class="line">
				<dt class="w200">谁可以给我发站内信</dt>
                <dd class="w720">
				<select class="pubinput" name="message">
					<option value="2" <?php if(isset($privacy['message']) && $privacy['message'] == 2) echo "selected='selected'";?>>所有人</option>
					<option value="1" <?php if(isset($privacy['message']) && $privacy['message'] == 1) echo "selected='selected'";?>>仅好友</option>
					<option value="0" <?php if(isset($privacy['message']) && $privacy['message'] == 0) echo "selected='selected'";?>>仅自己</option>
				</select>
                </dd>
			</dl>
			<dl class="line">
				<dt class="w200">谁可以看我的投标记录</dt>
                <dd class="w720">
				<select class="pubinput" name="tender">
					<option value="2" <?php if(isset($privacy['tender']) && $privacy['tender'] == 2) echo "selected='selected'";?>>所有人</option>
					<option value="1" <?php if(isset($privacy['tender']) && $privacy['tender'] == 1) echo "selected='selected'";?>>仅好友</option>
					<option value="0" <?php if(isset($privacy['tender']) && $privacy['tender'] == 0) echo "selected='selected'";?>>仅自己</option>
				</select>
                </dd>
			</dl>
			<dl class="line">
				<dt class="w200">谁可以看我的借款记录</dt>
                <dd class="w720">
				<select class="pubinput" name="borrow">
					<option value="2" <?php if(isset($privacy['borrow']) && $privacy['borrow'] == 2) echo "selected='selected'";?>>所有人</option>
					<option value="1" <?php if(isset($privacy['borrow']) && $privacy['borrow'] == 1) echo "selected='selected'";?>>仅好友</option>
					<option value="0" <?php if(isset($privacy['borrow']) && $privacy['borrow'] == 0) echo "selected='selected'";?>>仅自己</option>
				</select>
                </dd>
			</dl>
			<dl class="line">
				<dt class="w200">是否接受短信推广信息</dt>
                <dd class="w720">
				<input type="radio" value="1" name="ad" <?php if(isset($privacy['ad']) && $privacy['ad'] == 1) echo "checked='checked'";?>><label>允许</label>
				<input type="radio" value="0" name="ad" <?php if(isset($privacy['ad']) && $privacy['ad'] == 0) echo "checked='checked'";?>><label>不允许</label>
                </dd>
			</dl>
            <div class="cb"><input class="button" type="button" value="提交" onclick="toSubmit();" style=" float:left; margin:0px !important; " /> <p style="color: red;background-color: white; float:left; line-height:40px; font-size:16px; font-weight:bold; padding-left:20px; ">* 温馨提示：请保护好自己的隐私</p></div>       
        </form>
        </div>
	</div>
</div>
<div class="clear h50"></div>
<?php include "./application/views/footer.php";?>
                        <script>
                            function toSubmit(){
                                var options = {
                                    url : '/user/privacy.html',
                                    dataType: "text",
                                    type:"post",
                                    success : function(ret) {
                                        $('#dialog').dialog({
                                            modal:true,
                                            title:'系统提示',
                                            buttons:{"确定":function(){$(this).dialog("close");}},
                                            close: function() {
                                                //location=ret.url;
                                            }
                                        });
                                        $("#msg").html(ret);
                                    }
                                };
                                $("#privacy_form").ajaxSubmit(options);
                                return false;
                            }

                        </script>